<template>
  <div class="content content56">
    <div>检测条件：温度T：<el-input v-model="form.temperature" class="input-line" />℃；气压p：<el-input v-model="form.pressure" class="input-line" />Kpa</div>
    <div class="innertitle">
      1.校准点有用射束吸收剂量的测定：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>照射野</td>
        <td>SSD</td>
        <td>PDD5cm</td>
        <td>照射时间设定值</td>
        <td>剂量率，cGy/min</td>
        <td>校准深度</td>
        <td>校准因子<i>$N_k$</i></td>
      </tr>
      <tr>
        <td>10cm×10cm</td>
        <td class="multipleInput"><el-input v-model="form.absorbedDose.ssd" class="input-line" />cm</td>
        <td><el-input v-model="form.absorbedDose.pdd" class="input-line" /></td>
        <td class="multipleInput"><el-input v-model="form.absorbedDose.second" class="input-line" />s</td>
        <td><el-input v-model="form.absorbedDose.doseRate" class="input-line" /></td>
        <td>5cm</td>
        <td><el-input v-model="form.absorbedDose.calibrationFactor" class="input-line" /></td>
      </tr>
    </table>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td :colspan="absorbedDose.table.td+2">仪器读数，Mu，mGy</td>
        <td rowspan="2">校准点有用射束吸收剂量治疗剂量偏差，%</td>
      </tr>
      <tr>
        <td v-for="tdIndex in absorbedDose.table.td" :key="tdIndex">{{tdIndex}}</td>
        <td>平均值</td>
        <td>校准值<i>$D_W$</i></td>
      </tr>
      <tr>
        <td v-for="tdIndex in absorbedDose.table.td" :key="tdIndex"><el-input v-model="form.absorbedDose['readoutValue_'+tdIndex]" class="input-line" /></td>
        <td><el-input v-model="form.absorbedDose.averageValue" class="input-line" /></td>
        <td><el-input v-model="form.absorbedDose.calibrationValue" class="input-line" /></td>
        <td><el-input v-model="form.absorbedDose.doseDeviation" class="input-line" /></td>
      </tr>
    </table>
    <div class="latex">
      <i>$D_W = \frac {\overline {M_u} \times N_{D,air} \times S_{w,air} \times P_{wall} \times P_{cav} \times P_{cel}}{PDD_s}$</i>
      ，&nbsp;&nbsp;<i>$N_{D,air} = N_k(1-g)k_{att}k_mk_{cel}$</i>
      ，&nbsp;&nbsp;<i>$P_{wall} = \frac{\alpha \times S_{wall,air} \times (\mu_{en}/\rho)_{w,wall}+(1+\alpha)\times S_{W,air}}{S_{W,air}}$</i>
      ，&nbsp;&nbsp;<i>$\alpha = 1-e^{-11.88t}$</i>
    </div>
    <div class="innertitle">
      2.辐射对称性、半影：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td rowspan="2">照射野</td>
        <td rowspan="2">SSD，cm</td>
        <td rowspan="2">水下，cm</td>
        <td rowspan="2">方向</td>
        <td rowspan="2">对称性<br/>%</td>
        <td colspan="2">半影，mm</td>
      </tr>
      <tr>
        <td>左</td>
        <td>右</td>
      </tr>
      <tr>
        <td rowspan="2">10cm×10cm</td>
        <td rowspan="2">80</td>
        <td rowspan="2">10</td>
        <td>AB</td>
        <td><el-input v-model="form.actinomorphy.symmetry_ab" class="input-line" /></td>
        <td><el-input v-model="form.actinomorphy.leftPenumbra_ab" class="input-line" /></td>
        <td><el-input v-model="form.actinomorphy.rightPenumbra_ab" class="input-line" /></td>
      </tr>
      <tr>
        <td>GT</td>
        <td><el-input v-model="form.actinomorphy.symmetry_gt" class="input-line" /></td>
        <td><el-input v-model="form.actinomorphy.leftPenumbra_gt" class="input-line" /></td>
        <td><el-input v-model="form.actinomorphy.rightPenumbra_gt" class="input-line" /></td>
      </tr>
    </table>
    <div class="innertitle">
      3.照射野与光野重合度、等中心：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>胶片型号</td>
        <td>SSD</td>
        <td>照射野</td>
        <td>0°、45°、90°、135°各方向照射剂量，cGy</td>
      </tr>
      <tr>
        <td><el-input v-model="form.coincidenceIsocenter.filmType" class="input-line" /></td>
        <td>80cm</td>
        <td>10cm×10cm</td>
        <td><el-input v-model="form.coincidenceIsocenter.exposureDose" class="input-line" /></td>
      </tr>
    </table>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>准直器等中心偏差，mm</td>
        <td>大机架等中心偏差，mm</td>
        <td>治疗床等中心偏差，mm</td>
        <td>照射野与光野偏差，mm</td>
      </tr>
      <tr>
        <td><el-input v-model="form.coincidenceIsocenter.collimatorCenterDeviation" class="input-line" /></td>
        <td><el-input v-model="form.coincidenceIsocenter.largeRackCenterDeviation" class="input-line" /></td>
        <td><el-input v-model="form.coincidenceIsocenter.treatmentBedCenterDeviation" class="input-line" /></td>
        <td><el-input v-model="form.coincidenceIsocenter.fieldDeviation" class="input-line" /></td>
      </tr>
    </table>
    <div class="innertitle" style="display: flex;justify-content: space-between;">
      4.放射源活度： <span>校准因子： <el-input v-model="form.radioactiveSourceActivity.calibrationFactor" class="input-line" /></span>
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>检测条件</td>
        <td>SSD</td>
        <td>照射野</td>
        <td>次数</td>
        <td>仪器读数<i>$R_i$</i>mGy</td>
        <td>照射时间</td>
        <td>照射量率X<br/>μGy/h</td>
        <td>活度A<br/>TBq</td>
      </tr>
      <tr v-for="trIndex in radioactiveSourceActivity.table.tr" :key="trIndex">
        <td :rowspan="radioactiveSourceActivity.table.tr" v-if="trIndex==1">空气中</td>
        <td :rowspan="radioactiveSourceActivity.table.tr" v-if="trIndex==1">80cm</td>
        <td :rowspan="radioactiveSourceActivity.table.tr" v-if="trIndex==1">10cm×10cm</td>
        <td>{{trIndex}}</td>
        <td><el-input v-model="form.radioactiveSourceActivity['readoutValue_'+trIndex]" class="input-line" /></td>
        <td :rowspan="radioactiveSourceActivity.table.tr" v-if="trIndex==1">60s</td>
        <td :rowspan="radioactiveSourceActivity.table.tr" v-if="trIndex==1"><el-input v-model="form.radioactiveSourceActivity.exposureRate" class="input-line" /></td>
        <td :rowspan="radioactiveSourceActivity.table.tr" v-if="trIndex==1"><el-input v-model="form.radioactiveSourceActivity.activityA" class="input-line" /></td>
      </tr>
    </table>
    <div class="latex">
      <i>$A=\frac{X\times SSD^2}{0.236\times \Gamma} \times 10^{-6}$</i>
      ，&nbsp;&nbsp;<i>$\Gamma = 1.32 R \cdot m^2 /h / Ci$</i>
    </div>
    <div class="innertitle">
      5.源皮距（SSD）位置偏差：
    </div>
    <div>
      机械指示杆显示值：  800  mm，光标尺显示值：<el-input v-model="form.positionDeviation.displayValue" class="input-line" />mm，相对偏差为<el-input v-model="form.positionDeviation.relativeDeviation" class="input-line" />mm
    </div>
    <div class="innertitle">
      6.计时器控制照射时间相对偏差：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>SSD</td>
        <td>计时器设置60s输出剂量<i>$D_t$</i>，mGy</td>
        <td>仪器测量60s显示读数<i>$D_0$</i>，mGy</td>
        <td>相对偏差<i>$η_t$</i>，%</td>
      </tr>
      <tr>
        <td>80cm</td>
        <td><el-input v-model="form.relativeDeviation.outputDose" class="input-line" /></td>
        <td><el-input v-model="form.relativeDeviation.displayValue" class="input-line" /></td>
        <td><el-input v-model="form.relativeDeviation.relativeDeviation" class="input-line" /></td>
      </tr>
    </table>
    <div class="latex">
      <i>$η_t = \frac {D_t-D_0}{D_0} \times 100 \%$</i>
    </div>
    <div class="innertitle">
      7.准直器束轴：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>SSD</td>
        <td>照射野</td>
        <td>旋转角度</td>
        <td>偏差，mm</td>
      </tr>
      <tr>
        <td>80cm</td>
        <td>10cm×10cm</td>
        <td>0°、90°、180°、270°</td>
        <td><el-input v-model="form.collimatorBeamAxis.deviation" class="input-line" /></td>
      </tr>
    </table>
    <div class="innertitle">
      8.照射期间透过准直器的泄漏辐射空气比释动能率：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>放射源活度</td>
        <td>SSD</td>
        <td>照射野</td>
        <td>照射时间</td>
        <td>校准因子f</td>
      </tr>
      <tr>
        <td><el-input v-model="form.leakageAirRatio.activity" class="input-line" /></td>
        <td>80cm</td>
        <td>10cm×10cm</td>
        <td>60s</td>
         <td><el-input v-model="form.leakageAirRatio.calibrationFactor" class="input-line" /></td>
      </tr>
    </table>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td rowspan="3">照射期间泄露辐射</td>
        <td :colspan="leakageAirRatio.table.td+1">空气比释动能率K，mGy/min</td>
        <td rowspan="2">透过率<i>$η_c\%$</i></td>
      </tr>
      <tr>
        <td>照射野中心处<i>$E_c$</i></td>
        <td :colspan="leakageAirRatio.table.td">照射野边界外2cm处<i>$E_r$</i></td>
      </tr>
      <tr>
        <td><el-input v-model="form.leakageAirRatio.center" class="input-line" /></td>
        <td v-for="tdIndex in leakageAirRatio.table.td" :key="tdIndex"><el-input v-model="form.leakageAirRatio['boundary_'+tdIndex]" class="input-line" /></td>
        <td><el-input v-model="form.leakageAirRatio.transmittance" class="input-line" /></td>
      </tr>
    </table>
    <div class="latex">
      <i>$η_c = \frac {E_c}{E_r} \times 100 \%$</i>
    </div>
    <div class="innertitle">
      9.关束状态杂散辐射空气比释动能率：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center" style="position: relative;top:3px;">
      <tr>
        <td>本底测量值，nGy/h</td>
        <td v-for="tdIndex in strayRadiationAirRatio.table.td1" :key="tdIndex"><el-input v-model="form.strayRadiationAirRatio['background_'+tdIndex]" class="input-line" /></td>
        <td>校准因子f</td>
        <td><el-input v-model="form.strayRadiationAirRatio.calibrationFactor" class="input-line" /></td>
      </tr>
    </table>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td rowspan="2">关束状态<br/>杂散辐射</td>
        <td v-for="(tdItem,tdIndex) in strayRadiationAirRatio.table.td2" :key="tdIndex" v-html="tdItem+'处杂散辐射水平修正值<i>$K_{'+tdItem+'}$</i>，μGy/h'"></td>
      </tr>
      <tr>
        <td v-for="(tdItem,tdIndex) in strayRadiationAirRatio.table.td2" :key="tdIndex">
          <el-input v-model="form.strayRadiationAirRatio['correctedValue_'+(tdIndex+1)]" class="input-line" />
        </td>
      </tr>
      <tr>
        <td :colspan="1+strayRadiationAirRatio.table.td2.length">
          <div style="display: flex;flex-direction: column;justify-content: center;">
            <div style="text-align: left;">附注：1、下图中阴影区域内各位点测量值K1；2、检测结果取各位点剂量率最大值且未扣除本底值。</div>
            <img src="@/assets/images/test_item56/form_9.png" alt="">
          </div>
        </td>
      </tr>
    </table>
    <div class="latex">
      <i>$K=K_1 \cdot f$</i>
    </div>
    <div class="innertitle">
      10.距放射源1m处最大辐射束外泄辐射空气比释动能率：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center" style="position: relative;top:3px">
      <tr>
        <td :rowspan="maxLeakageAirRatio.table.arr.length+1">空气比释动能率,μGy/h</td>
        <template v-for="index in maxLeakageAirRatio.table.td">
          <td>关注点</td>
          <td>测量值</td>
        </template>
      </tr>
      <tr v-for="(trItem,trIndex) in maxLeakageAirRatio.table.arr" :key="trIndex">
        <template  v-for="(tdItem,tdInex) in trItem" >
          <td>{{tdItem.name}}</td>
          <td><el-input v-model="form.maxLeakageAirRatio['measuredValue'+tdItem.value]" class="input-line" /></td>
        </template>
      </tr>
    </table>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td>结果</td>
        <td style="max-width: 120px;">1m处辐射束轴上最大空气比释动能率，μGy/h</td>
        <td><el-input v-model="form.maxLeakageAirRatio.kineticEnergy" class="input-line" /></td>
        <td>检测结果,%</td>
        <td><el-input v-model="form.maxLeakageAirRatio.result" class="input-line" /></td>
      </tr>
    </table>
    <div style="display: flex;flex-direction: column;justify-content: center;align-items: center;">
      <img src="@/assets/images/test_item56/form_10.png" alt="" style="width: 700px;"/>
      <div style="display: flex;justify-content: space-around;width: 722px ;">
        <span>测点层次示意图</span>
        <span>各层测点方位示意图</span>
      </div>
    </div>
    <div class="innertitle">
      11.β放射性物质表面污染：
    </div>
    <table border="1" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td></td>
        <td>仪器读数<i>$C_i$</i></td>
        <td>本底值<i>$C_b$</i></td>
        <td>表面放射性污染<i>$C_o，Bq/cm^2$</i></td>
      </tr>
      <tr>
        <td>
          <el-select v-model="form.radioactiveSurfaceContamination.isDirect" placeholder="请选择">
              <el-option
                v-for="item in [{'value':1,'label':'直接测量法'},{'value':2,'label':'间接测量法'}]"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
          </el-select>
        </td>
        <td><el-input v-model="form.radioactiveSurfaceContamination.valueCi" class="input-line" /></td>
        <td><el-input v-model="form.radioactiveSurfaceContamination.valueCb" class="input-line" /></td>
        <td><el-input v-model="form.radioactiveSurfaceContamination.valueCo" class="input-line" /></td>
      </tr>
      <tr>
        <td colspan="4" style="text-align: left;">附注1表面放射性污染检测结果已扣除本底值。</td>
      </tr>
    </table>
    <div class="latex">
      <i>$C_o = \frac {C_i - C_b}{R}$</i>
    </div>
  </div>
</template>

<script>
  import {getInfoById, postInfo} from '@/api/testItem/item56'
  export default{
    name:'testItem56',
    props: {
    	// tab栏
      activeNameEquipment: {
    		type: String,
        default: "0",
      },
    	// 基本信息数据
      basicForm: {
    		type: Object,
        default: () => {
    			return {}
    		},
      },
    },
    data(){
      return{
        initFlag:false,
        "sdd": {
          action:'saveInfo',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
        },
        "absorbedDose": {
          action:'absorbedDose',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
          table:{
            td:5
          }
        },
        "actinomorphy": {
          action:'actinomorphy',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
        },
        "coincidenceIsocenter": {
          action:'isocenter',
          flag:true,
          loading:false,
          notNumber:['filmType'],
          intNumber:[],
          like:false,
        },
        "radioactiveSourceActivity": {
          action:'activity',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
          table:{
            tr:3
          }
        },
        "positionDeviation": {
          action:'positionDeviation',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
        },
        "relativeDeviation": {
          action:'relativeDeviation',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
        },
        "collimatorBeamAxis": {
          action:'collimatorBeamAxis',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
        },
        "leakageAirRatio": {
          action:'leakageAirRatio',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
          table:{
            td:4
          }
        },
        "strayRadiationAirRatio": {
          action:'airRatio',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
          table:{
            td1:5,
            td2:['1m','5cm']
          }
        },
        "maxLeakageAirRatio": {
          action:'maxLeakageAirRatio',
          flag:true,
          loading:false,
          notNumber:[],
          intNumber:[],
          like:false,
          table:{
            td:5,
            arr:[
            [{'name':'1','value':'_1_1'},{'name':'2-①','value':'_2_1'},{'name':'2-②','value':'_2_2'},{'name':'2-③','value':'_2_3'},{'name':'2-④','value':'_2_4'}],
            [{'name':'2-⑤','value':'_2_5'},{'name':'2-⑥','value':'_2_6'},{'name':'2-⑦','value':'_2_7'},{'name':'2-⑧','value':'_2_8'},{'name':'3-①','value':'_3_1'}],
            [{'name':'3-②','value':'_3_2'},{'name':'3-③','value':'_3_3'},{'name':'3-④','value':'_3_4'},{'name':'3-⑤','value':'_3_5'},{'name':'3-⑥','value':'_3_6'}],
            [{'name':'3-⑦','value':'_3_7'},{'name':'3-⑧','value':'_3_8'},{'name':'4-①','value':'_4_1'},{'name':'4-②','value':'_4_2'},{'name':'4-③','value':'_4_3'}],
            [{'name':'4-④','value':'_4_4'},{'name':'4-⑤','value':'_4_5'},{'name':'4-⑥','value':'_4_6'},{'name':'4-⑦','value':'_4_7'},{'name':'4-⑧','value':'_4_8'}],
          ],
          }
        },
        "radioactiveSurfaceContamination": {
          action:'radioactiveSurfaceContamination',
          flag:true,
          loading:false,
          notNumber:['isDirect'],
          intNumber:[],
          like:false,
        },
        "form": {
          "itemsId": 0,
          "resultId": 0,
          "temperature": 0.0,
          "pressure": 0.0,
          "absorbedDose": {
            "itemsId": 0
          },
          "actinomorphy": {
            "itemsId": 0
          },
          "coincidenceIsocenter": {
            "itemsId": 0
          },
          "radioactiveSourceActivity": {
            "itemsId": 0
          },
          "positionDeviation": {
            "itemsId": 0
          },
          "relativeDeviation": {
            "itemsId": 0
          },
          "collimatorBeamAxis": {
            "itemsId": 0
          },
          "leakageAirRatio": {
            "itemsId": 0
          },
          "strayRadiationAirRatio": {
            "itemsId": 0
          },
          "maxLeakageAirRatio": {
            "itemsId": 0
          },
          "radioactiveSurfaceContamination":{
            "itemsId": 0
          }
        }
      }
    },
    watch:{
      activeNameEquipment: {
        handler(val) {
          this.$nextTick(()=>{
            let resultId = this.basicForm.resultId;
            getInfoById(resultId).then(response => {
              if(response.code == 200){
                let data = response.data;
                for(let keys in data){
                  this.setData(keys,data[keys]);
                }
                 setTimeout(()=>{
                   this.initFlag = true;
                 },300)
              }
            }).catch((response) => {
               this.$emit("loadingchange", true);
             });
             });
        },
        deep: true,
        immediate: true
      },
      "form.absorbedDose":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'absorbedDose');
         }
        },
        deep:true,
      },
      "form.actinomorphy":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'actinomorphy');
         }
        },
        deep:true,
      },
      "form.coincidenceIsocenter":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'coincidenceIsocenter');
         }
        },
        deep:true,
      },
      "form.radioactiveSourceActivity":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'radioactiveSourceActivity');
         }
        },
        deep:true,
      },
      "form.positionDeviation":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'positionDeviation');
         }
        },
        deep:true,
      },
      "form.relativeDeviation":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'relativeDeviation');
         }
        },
        deep:true,
      },
      "form.collimatorBeamAxis":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'collimatorBeamAxis');
         }
        },
        deep:true,
      },
      "form.leakageAirRatio":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'leakageAirRatio');
         }
        },
        deep:true,
      },
      "form.strayRadiationAirRatio":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'strayRadiationAirRatio');
         }
        },
        deep:true,
      },
      "form.maxLeakageAirRatio":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'maxLeakageAirRatio');
         }
        },
        deep:true,
      },
      "form.radioactiveSurfaceContamination":{
        handler(newName, oldName) {
         if(this.initFlag){
          this.validateData(newName,'radioactiveSurfaceContamination');
         }
        },
        deep:true,
      },
      "form.temperature":{
          handler(newName, oldName) {
            if(this.initFlag){
             this.validateData(this.form,'sdd');
            }
          },
        },
      "form.pressure":{
        handler(newName, oldName) {
          if(this.initFlag){
           this.validateData(this.form,'sdd');
          }
        },
      },
    },
    methods:{
      //修改数据
      setData(name,data){
        this.form[name] = data ? data : (this[name] ? {}:null);
      },
      //表单修改提交后端
       postForm(param,name){
         param['itemsId'] = this.form.itemsId;
         this.$emit("loadingchange", true);
      	 postInfo(param,this[name].action).then(res=>{
      		 this.$emit("loadingchange", false);
      		 if(res.code == 200){
      			 this[name].flag = false;
      			 if(name != 'sdd'){
      				this.setData(name,res.data);
      			 }
      		 }
      	 })
      },
      validateType(arr,keys,obj){
      	if(obj.like){
      		for(let i=0;i<arr.length;i++){
      			if(keys.indexOf(arr[i]) != -1){
      				return true;
      			}
      		}
      		return false;
      	}else{
      		if(arr.indexOf(keys) != -1){
      			return true;
      		}
      		return false;
      	}
      },
       //数据验证
       validateData(newName,myName){
      	 if(!this[myName].noClear){
      		clearTimeout(this[myName].loading);
      	 }else{
      		 this[myName].noClear = false;
      	 }
         let regNumber = /^[-]?\d*([.](\d+))?$/;//小数验证正则
         let regRepNumber = /[^-?\d.,]/g;//将除小数外的符号消除正则
         let regInt = /^\d*$/;//整数验证正则
         let regRepInt = /[^-?\d,]/g;//将除小数外的符号消除正则
         let reg,regRep;
         let repStr = '';
      	 let intResult
         if(JSON.stringify(newName) != '{}'){
           //遍历该对象所有字段进行验证
           for(let keys in newName){
             //数字验证环节
      			 if((typeof newName[keys] == 'string') ||  (typeof newName[keys] == 'number')){
      				if(newName[keys] && !this.validateType(this[myName].notNumber,keys,this[myName])){
      					intResult = this.validateType(this[myName].intNumber,keys,this[myName]);
      					reg = intResult ? regInt:regNumber;
      				  let bool = !reg.test(newName[keys]);
      				  if(bool){
      						setTimeout(()=>{
      							intResult = this.validateType(this[myName].intNumber,keys,this[myName]);
      							regRep = intResult ? regRepInt:regRepNumber;
      									repStr = newName[keys] + '';
      							repStr =  repStr.replace(regRep,'');
      							if(repStr != (newName[keys]+'')){
      								if(!this[myName].noClear){
      									this[myName].noClear = true;
      								}
      								newName[keys] = repStr;
      							}
      						},100);
      						if(this[myName].flag){
      						 this[myName].flag = false;//如果数字验证不通过不需要请求后端
      						}
      				  }
      				}
      			 }
           }
      		 this.isPost(newName,myName);
         }
       },
       isPost(newName,myName){
      	 if(this[myName].flag){//是否请求后端判断
      	  let postBody = {};
      	  for(let i in newName){
      	    if(newName[i] !== null && newName[i] !== undefined){
      	      postBody[i] = newName[i];
      	    }
      	  }
      	  if(JSON.stringify(postBody) != '{}'){
      			this[myName].loading = setTimeout(()=>{
      				this.postForm(postBody,myName);
      			},800)
      	  }
      	 }else{
      		 this[myName].flag = true;
      	 }
       },
    },
  }
</script>

<style lang="scss" scoped>
  @import '../content.scss';

  .miniFont {
    font-size: 10px;
  }

  .miniFontCenter {
    margin-top: 8px;
  }

  .content56 {
    padding-inline: 0 !important;
    ::v-deep .el-input__suffix{
      display: none;
    }
    .latex{
      margin-top: 15px;
    }
    table {
      width: 100%;

      td {
        max-width: 100px;

        ::v-deep .el-checkbox__label {
          white-space: break-spaces;
        }
      }

      .el-input {
        width: 100% !important;
      }

      .multipleInput {
        .el-input {
          width: 50px !important;
        }
      }
    }

    .innertitle {
      display: block;
      margin-left: 0;
    }

    .table1 {
      .el-radio {
        display: flex;
        align-items: center;
      }
    }

    #hearderTR td:nth-child(7) {
      display: none;
    }
  }
</style>
